<?php
/**
 * Created by PhpStorm.
 * User: hebidu
 * Date: 16/4/18
 * Time: 00:12
 */
namespace app\system\api;

use app\common\api\BaseApi;
use app\system\model\UcenterMember;


class UcenterMemberApi extends BaseApi{

    const GET_INFO = 'system/UcenterMemberApi/getInfo';

    /**
     * 抽象方法，用于设置模型实例
     */
    protected function _init()
    {
        $this->model = new UcenterMember();
    }

    public function register($data){

        $result = $this->model
            ->create($data);
        if($result === false){
            return $this->model->getError();
        }else{
            return $this->model->add();
        }
    }

}